package com.wangsh.projDemo.demo.service;

import java.util.Map;

import com.wangsh.projDemo.common.pojo.ApiResponse;
import com.wangsh.projDemo.common.util.PageInfoUtil;
import com.wangsh.projDemo.demo.pojo.ADemoDynasty;
import com.wangsh.projDemo.demo.pojo.ADemoKing;

/**
 * Service接口(示例代码)
 * 此接口中只存储数据库表的CRUD
 * @author Wangsh
 */
public interface IDemoService
{
	/*----- 朝代模块管理开始 -----*/
	/**
	 * 添加一条朝代
	 * 
	 * @param demoDynasty
	 * @return
	 */
	ApiResponse<Object> saveOneDynastyService(ADemoDynasty dynasty);

	/**
	 * 更新一条朝代
	 * 
	 * @param demoDynasty
	 * @return
	 */
	ApiResponse<Object> updateOneDynastyService(ADemoDynasty dynasty);

	/**
	 * 删除一条朝代
	 * 
	 * @param demoDynasty
	 * @return
	 */
	ApiResponse<Object> deleteOneDynastyService(Map<String, Object> condMap);

	/**
	 * 查询多条朝代
	 * 
	 * @param pageInfo
	 * @param type
	 * @param condMap
	 * @return
	 */
	ApiResponse<ADemoDynasty> findCondListDynastyService(PageInfoUtil pageInfoUtil , Map<String, Object> condMap);

	/**
	 * 查询一条朝代
	 * 
	 * @param type
	 * @param condMap
	 * @return
	 */
	ApiResponse<ADemoDynasty> findOneDynastyService(Map<String, Object> condMap);
	/*----- 朝代模块管理结束 -----*/
	

	/*----- 皇上模块管理开始 -----*/
	/**
	 * 添加一条皇上
	 * 
	 * @param demoKing
	 * @return
	 */
	ApiResponse<Object> saveOneKingService(ADemoKing king);

	/**
	 * 更新一条皇上
	 * 
	 * @param demoKing
	 * @return
	 */
	ApiResponse<Object> updateOneKingService(ADemoKing king);

	/**
	 * 删除一条皇上
	 * 
	 * @param demoKing
	 * @return
	 */
	ApiResponse<Object> deleteOneKingService(Map<String, Object> condMap);

	/**
	 * 查询多条皇上
	 * 
	 * @param pageInfo
	 * @param type
	 * @param condMap
	 * @return
	 */
	ApiResponse<ADemoKing> findCondListKingService(PageInfoUtil pageInfoUtil , Map<String, Object> condMap);

	/**
	 * 查询一条皇上
	 * 
	 * @param type
	 * @param condMap
	 * @return
	 */
	ApiResponse<ADemoKing> findOneKingService(Map<String, Object> condMap);
	/*----- 皇上模块管理结束 -----*/
}
